home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 / Ham Radio 2000.iso / ham2000 / packet / monax25 / monfile.h < prev    next >
Text File  |  1987-10-18  |  4KB  |  153 lines

  1. /* monfile.h */
  2.  
  3. /* This file defines the structure of the monitor file records used by
  4.    stats and report.
  5.  
  6.  
  7. The basic structure is:
  8.  
  9.  
  10.     <record type (one char)><data><\n>
  11.  
  12.  
  13.  
  14. A set of records is output every 5 minutes.  Each group is prefaced by
  15. a timestamp record.  Following are all of the data records for
  16. that interval.  
  17.  
  18. */
  19.  
  20.  
  21. /* Concepts -
  22.     
  23.     unique packets - items received not including duplicates
  24.             caused by re-transmission or digipeating
  25.  
  26.     total packets/bytes - total items received.
  27.     
  28. */
  29.  
  30. /* Record types */
  31. #define CIRCUIT_TYPE 'C'
  32. #define DIGI_TYPE 'D'
  33. #define FREQ_TYPE 'F'
  34. #define ID_TYPE   'I'
  35. #define TIME_TYPE 'T'
  36.  
  37. /* Time record */
  38. /* A time stamp for all other records that follow.  The time is the time
  39.    of the START of the interval */
  40.  
  41. struct TIME_RECORD {
  42.     unsigned long time_stamp;
  43.     };
  44.  
  45.  
  46. /* Circuit record.
  47.  
  48. A circuit record contains data for a circuit for the five minute interval.
  49. A circuit is a level two to/from pair.
  50. */
  51.         
  52.  
  53. struct CIRCUIT_RECORD {
  54.     char to[10];            /* to call */
  55.     char from[10];            /* from call */
  56.     unsigned int digis;        /* number of digipeaters for this circuit */
  57.     unsigned int pid;        /* pid in use on this circuit */    
  58.     unsigned long u_dpackets;    /* unique data packets */
  59.     unsigned long nd_dpackets;    /* non-digipeated data packets */
  60.     unsigned long t_dpackets;    /* total data packets */
  61.     unsigned long nd_packets;    /* non-digipeated packets */
  62.     unsigned long t_packets;    /* total packets */
  63.     unsigned long u_dbytes;        /* unique data bytes */
  64.     unsigned long nd_dbytes;    /* non-digipeated data bytes */
  65.     unsigned long t_dbytes;        /* total data bytes */
  66.     unsigned long nd_bytes;        /* non-digipeated bytes */
  67.     unsigned long t_bytes;        /* total bytes */
  68.     unsigned long c_time;        /* time circuit placed in table */
  69.                     /* total packet type counters 
  70.                         (does not include digipeats)
  71.                     */
  72.     unsigned long sabm;
  73.     unsigned long ua;
  74.     unsigned long disc;
  75.     unsigned long dm;
  76.     unsigned long rej;
  77.     unsigned long rr;
  78.     unsigned long rnr;
  79.     unsigned long i;
  80.     unsigned long ui;
  81.     unsigned long frmr;
  82.     unsigned long poll;
  83.     unsigned long final;
  84.                     /* size of DATA portion of I frame */
  85.                     /* unique frames only */
  86.     unsigned long l32;        /* <=32 */
  87.     unsigned long l64;        /* <=64 */
  88.     unsigned long l128;        /* <=128 */
  89.     unsigned long l256;        /* <=256 */
  90.     unsigned long g256;        /* > 256 */
  91.     };
  92.  
  93.  
  94.  
  95. /* digipeater record */
  96. /* Gives total traffic sent by a digipeater without regard to the
  97.     destination */
  98.  
  99. struct DIGI_RECORD {
  100.     unsigned char call[10];        /* call of digi */
  101.     unsigned long t_packets;    /* total packets */
  102.     unsigned long t_bytes;        /* total bytes */
  103.     };
  104.  
  105. /* frequency record */
  106. /* This record gives values for the frequency without regard to
  107. circuits.
  108. */
  109.  
  110. struct FREQ_RECORD {
  111.     unsigned long t_packets;    /* total packets */
  112.     unsigned long t_bytes;        /* total bytes */
  113.     unsigned long u_packets;    /* unique packets */
  114.     unsigned long u_bytes;        /* unique bytes */
  115.     unsigned long l32;        /* <=32 */
  116.     unsigned long l64;        /* <=64 */
  117.     unsigned long l128;        /* <=128 */
  118.     unsigned long l256;        /* <=256 */
  119.     unsigned long g256;        /* > 256 */
  120.     unsigned long dcd_on_ticks;    /* ticks when DCD was on */
  121.     unsigned long dcd_off_ticks;    /* ticks when DCD was off */
  122.     };
  123.  
  124.  
  125. /* file id record */
  126. /* This record is intended to label the file to make storage and later 
  127. analysis easier.  For example, the baud rate would be 1200, the frequency
  128. 145.01, and the comment "Via remote on Mt. Wilson ".  The contents of
  129. this record set via commands to the MON program,
  130. the record is emitted by MON once at the start of the file.
  131. *** Not yet Implemented ***
  132.  
  133. */
  134.  
  135. struct ID_RECORD {
  136.     char freq[10];        /* freq ID string */
  137.     char baud[5];        /* baud rate */
  138.     char comments[80];    /* comments */
  139.     };
  140.  
  141.  
  142.  
  143. struct SEL {
  144.     int c;
  145.     int d;
  146.     int f;
  147.     int i;
  148.     int t;
  149.     };
  150.  
  151.  
  152.  
  153.